package com.doubi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.doubi.entity.Inform;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface LiketableMapper extends BaseMapper<Inform.Liketable> {
    @Select("select count(*) from liketable where releaseId=${releaseId}")
    public int releaseCountLike(@Param("releaseId") Integer releaseId);

    //查询近七天作品获赞
    public Integer recentlyLike(@Param("rList") List<Integer> rList, @Param("dayTime") String dayTime, @Param("dayTime2") String dayTime2);

    //查询某一天我的视频总获赞
    public Integer todayLikeNum(@Param("rList") List<Integer> rList, @Param("dayTime") String dayTime);
}
